<template>
	<view class="content">
		<view class="shop" v-for="item in shopList" :key="item.goods_id" @click="godetail(item.goods_id)">
			<view class="shop_left">
				<image :src="item.goods_small_logo" mode="widthFix"></image>
			</view>
			<view class="shop_right">
				<view class="shop_content">{{item.goods_name}}</view>
				<view class="shop_price">￥{{item.goods_price}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				shopList:[]
			}
		},
		onShow() {
			const info=uni.getStorageSync('collect')
			this.shopList=info
		},
		methods: {
			godetail(res){
				uni.navigateTo({
					url:'/pages/good_detail/good_detail?goods_id='+res
				})
			}
		}
	}
</script>

<style lang="scss">
  .shop{
	  margin-top: 10rpx;
	  height: 200rpx;
	  background-color: #fff;
	  display: flex;
	  justify-content: space-between;
	  border-bottom: 2rpx solid gainsboro;
	  .shop_left{
		  flex: 2;
		  display: flex;
		  justify-content: center;
		  align-items: center;
		  padding: 10rpx 10rpx;
		  image{
			  height: 100rpx;
			  width: 90%;
		  }
	  }
	  .shop_right{
		  .shop_content{
			  display: -webkit-box;
			  overflow: hidden;
			  -webkit-box-orient:vertical;
			  -webkit-line-clamp:2;
		  }
		  flex: 4;
		  display: flex;
		  flex-direction: column;
		  justify-content: space-between;
		  .shop_price{
			  color: $shop-color;
			  font-size: 35rpx;
		  }
	  }
  }
</style>
